package com.startest.sms.web;

import com.startest.sms.service.TransactionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping(value = "/ts")
public class TransactionController {

    @Autowired
    private TransactionService transactionService;


    @RequestMapping(value = "/test",method = RequestMethod.POST)
    public void testTransaction(@RequestParam(value = "out") Integer out,
                                @RequestParam(value = "in") Integer in,
                                @RequestParam(value = "money") Integer money){
        transactionService.transfer(out,in,money);
    }

}
